﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Dack_Web2
{
    public partial class DangDeal : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (CurrentContext.IsLogged)
            {
                User Temp = Dack_Web2.User.FromId(CurrentContext.UserName);
                string sql = string.Format("Select * from SanPham sp, LoaiSanPham lsp where sp.MaLoaiSanPham = lsp.MaLoaiSanPham and MaUser = {0}",Temp.MaUser);
                grdSanPham.DataSource = Sql_DataProvider.SQL_ExecuteTable(sql);
                grdSanPham.DataBind();
            }
            else
            {
                Response.Redirect("~/Login.aspx");
            }
        }

        protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
        {

        }
          

    }
}